<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html>
<head>
  <title>审核</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  
   <link href="${server}/static/css/bootstrap.min.css" rel="stylesheet">
  <link href="${server}/static/css/bootstrap_new.css" rel="stylesheet">
 <script type="text/javascript" src="${server}/static/js/jquery.min.js"></script>
 <script type="text/javascript"  src="${server}/static/js/bootstrap.min.js"></script>
  <script type="text/javascript"  src="${server}/static/js/bootstrap_new.js"></script>
    <script type="text/javascript"  src="${server}/static/js/merchandise.js"></script>
  <style>
  .table>thead>tr>th{
  	font-size:6px
  }
  </style>
   <script type="text/javascript">
   $(document).ready(function(){
		 if('${message}' !='' && '${message}' !='null' ){
			 setMessage("alert-warning",'${message}');
		 }
		 var skustatus = $('#skuStatu').val();
		 if(skustatus!="1"&&skustatus!="3")skustatus="3";
		 $('.navtip').find('li').removeClass("active");
		 $('#'+skustatus+'skuStatu').addClass("active"); 
	});
	</script>

</head>
<body data-spy="scroll" data-target=".navbar" data-offset="50">
<%@include file="../common/header.jsp"%>
<input type="hidden" id="server" value="${server}">
<input type="hidden" id="skuStatu" value="${skuStatu}">
<input type="hidden" id="quotationId" value="${quotationId}">
<form action="" id="pagerForm"  method="post">
		
	<div class="container">
		<ul class="navtip">
			<li>${quotationName}</li>
			<li class="pull-right" id="1skuStatu"><a href="javascript:;" onclick="getReviewList(1)">囤货审核中</a></li>
			<li class="pull-right" id="3skuStatu"><a href="javascript:;" onclick="getReviewList(3)">发布审核中</a></li>
		
		</ul>
		</br> 
		
		<!-- alert-success alert-info alert-warning alert-danger-->
		<div class="alert alert-danger alert-dismissable" id="messageDiv"  style="display: none;" >
				   <button type="button" class="close" data-dismiss="alert" 
				      aria-hidden="true">
				      &times;
				   </button>
				 	<span id="message"></span>
			</div>
		<table class="table table-bordered table-hover  table-striped" contenteditable="true">
			<thead >
				<tr>
							<th style="min-width :50px">选择<input type="checkbox" style="checked:false" id="allcheck" onclick="checkAll(this)"></th>
					<th style="min-width :80px">发布状态</th>
					<th style="min-width :80px">囤货状态</th>
					<th style="min-width :50px">article_number</th><!-- 官网货号 -->
					<th style="min-width :50px">name</th>
					<th style="min-width :50px">pic</th>
					<th style="min-width :50px">${skuStatu=='1'? 'qty</br>(囤货数量)':'qty'}</th>
					<th style="min-width :50px">retail</th>
					<th style="min-width :20px">汇率</th>
					<th style="min-width :80px">欧洲折后价€</th>
					<th style="min-width :80px">欧洲官价¥</th>
					<th style="min-width :80px">国内官价¥</th>
					<th style="min-width :80px">折扣(相比国内官价)</th>
					<th style="min-width :50px">京东价¥</th>
					<th style="min-width :50px">预定价¥</th>
					<th style="min-width :20px">系数1</th>
					<th style="min-width :60px">全款价¥</th>
					<th style="min-width :20px">系数2</th>
					<th style="min-width :100px">参考网址</th>
					<th style="min-width :100px">商品名称</th>
					<th style="min-width :50px">颜色</th>
					<th style="min-width :80px">款式</th>
					<th style="min-width :80px">规格</th>
					<th style="min-width :200px">介绍</th>
					<th style="min-width :60px">备注</th>
					<th style="min-width :60px">成本价¥</th>
				</tr>
			</thead>
			<tbody>
					<c:if test="${! empty quotMerchlist}">
						<c:forEach  items="${quotMerchlist}" var="merch" varStatus="status">
						<tr class="merch" style="max-height:50px">
							<td><input name="ids" value="${merch.rowIndex}" 
										id="checkbox_${merch.rowIndex}"  type="checkbox" onclick="checkOne(this)" ></td>
							<td>${statusMap[merch.status]}</td>
							<td>${skuStatusMap[merch.skuStatus]}</td>
							<td>${merch.articleNumber }</td>
							<td>${merch.name }</td>
							<td>
								<c:if test="${! empty merch.picture}">
									<img src="/excelimg/${merch.picture}" width="100px"></c:if></td>
							<td><input type="hidden" value="${merch.summarySkuQty}" id="${merch.rowIndex}summarySkuQty" >
								${skuStatu=='1'? merch.summarySkuQty : merch.qty }</td>
							<td>${merch.retail }</td>
							<td>${merch.rate }</td>
							<td>${merch.europePrice }</td>
							<td>${merch.europePriceRmb}</td>
							<td>${merch.officePrice }</td>
							<td>${merch.europeOfficeDiscount }</td>
							<td>${merch.jingdongPrice }</td>
							<td>${merch.skuPrice }</td>
							<td>${merch.ratio1 }</td>
							<td>${merch.discountPrice }</td>
							<td>${merch.ratio2 }</td>
							<td>${merch.referenceInternetUrl }</td>
							<td>${merch.merchandiseName }</td>
							<td>${merch.merchandiseColor }</td>
							<td>${merch.merchandiseCollection }</td>
							<td>${merch.merchandiseSpecDesc }</td>
							<td>
								<c:if test="${! empty merch.merchandiseDesc }">
								 <textarea rows="3" cols="30" disabled="disabled" title="${merch.merchandiseDesc }" >
									 ${merch.merchandiseDesc }
								 </textarea>
								 </c:if>
							</td>
							<td>
								<c:if test="${! empty merch.remark }">
								<textarea rows="3" cols="30" disabled="disabled" title="${merch.remark }" >
									 ${merch.remark }
								 </textarea>
								</c:if>
							</td>
							<td></td>
						</tr>
				</c:forEach>
				</c:if>
				
			</tbody>
		</table>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<c:if test="${skuStatu!=1}">
					<button type="button" class="btn  btn-primary" onclick="pushOnsale()"contenteditable="true">发布</button>
					</c:if>
					<c:if test="${skuStatu==1}">
					<button type="button" class="btn  btn-primary" onclick="pushStocking()"contenteditable="true">囤货</button>
					</c:if>
					<button type="button" class="btn  btn-primary" onclick="backorder(${skuStatu})"contenteditable="true">退回</button>
					<button type="button" class="btn  btn-primary" onclick="javascript:window.location.href='${server }/quotation/list/';"contenteditable="true">返回</button>
				</div>
			</div>


	</div>
</form>


</body>
</html>
